<template>
  <div id="detail-bottom">
    <div class="bottom-icon">
      <div class="icon-item">
        <img src="~assets/img/tabbar/home.png" alt="" slot="item-icon" />
        <span>客服</span>
      </div>
      <div class="icon-item">
        <img src="~assets/img/tabbar/home.png" alt="" slot="item-icon" />
        <span>店铺</span>
      </div>
      <div class="icon-item">
        <img src="~assets/img/tabbar/home.png" alt="" slot="item-icon" />
        <span>收藏</span>
      </div>
    </div>
    <div class="bottom-btn">
      <div class="add-cart" @click="addToCart">加入购物车</div>
      <div class="buy-now" @click="buyNow">购买</div>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    addToCart() {
      this.$emit('add-to-cart')
    },
    buyNow() {
      console.log('sdfsdsfsdfs')
    },
  },
}
</script>

<style lang="less" scoped>
#detail-bottom {
  border-top: 1px solid #eeeeee;
  height: 49px;
  position: relative;
  z-index: 1;
  display: flex;

  .bottom-icon {
    flex: 1;
    display: flex;
    .icon-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      align-items: center;
      img {
        width: 25px;
      }

      span {
        font-size: 12px;
        color: #666666;
      }
    }
  }

  .bottom-btn {
    flex: 1;
    display: flex;
    flex-direction: row;
    text-align: center;
    line-height: 49px;
    color: #ffffff;
    .add-cart {
      flex: 1;
      background-color: orange;
    }

    .buy-now {
      flex: 1;
      background-color: @base-color;
    }
  }
}
</style>
